#ifndef __G_TRNG_H__
#define __G_TRNG_H__

#include "g_1903.h"
#include "g_system.h"
#include "g_timer.h"
/**
 * @brief  init TRNG
 * @param  none
 * @retval none
 */
void G_TRNG_Init(void);

/**
 * @brief  get 128bit TRNG data
 * @param  rand[4]:128bit TRNG data out of buf
 * @retval 0:succeed  1:error
 */
void G_TRNG_Get(volatile unsigned long *rand);

/**
 * @brief  Turn off Trng
 * @param  none
 * @retval none
 */
void G_TRNG_DeInit(void);

unsigned char G_GetTRNGData_8bit(void);

int G_GetTRNGData(void);

#endif
